package com.bawei.yangzongcai___chenmei.Adpter;

import android.widget.ImageView;

import com.bawei.yangzongcai___chenmei.JavaClass.LianxiClass;
import com.bawei.yangzongcai___chenmei.R;
import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * create by ertu
 * create on 2021/7/14
 * description
 */
public class QAQadpterActivity3 extends BaseQuickAdapter<LianxiClass, BaseViewHolder> {


    public QAQadpterActivity3( @Nullable List<LianxiClass> data) {
        super(R.layout.yangchen3, data);
        addChildClickViewIds(R.id.yangchen3_text1);
        addChildClickViewIds(R.id.yangchen3_text3);
        addChildLongClickViewIds(R.id.yangchen3_img);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, LianxiClass lianxiClass) {
        baseViewHolder.setText(R.id.yangchen3_text1,lianxiClass.getTile());
        baseViewHolder.setText(R.id.yangchen3_text3,lianxiClass.getDecs());
        Glide.with(getContext()).load(lianxiClass.getImg()).into((ImageView) baseViewHolder.getView(R.id.yangchen3_img));
    }
}
